home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16832 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1007 b 

  1. Path: news.th-darmstadt.de!news
  2. From: Enno Sandner <enno@intellektik.informatik.th-darmstadt.de>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Virtual function does not make any sense unless it is pure.
  5. Date: Fri, 12 Apr 1996 09:31:45 +0200
  6. Organization: Fachbereich Informatik, TH Darmstadt
  7. Message-ID: <316E06E1.167EB0E7@intellektik.informatik.th-darmstadt.de>
  8. References: <4kkhbc$nj4@brahms.udel.edu>
  9. NNTP-Posting-Host: kitz.intellektik.informatik.th-darmstadt.de
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.01 (X11; I; SunOS 4.1.3 sun4m)
  14.  
  15. Yue-hong Zheng wrote:
  16. > Can any body give me any examples to show non-pure virtual function does
  17. > make sense?
  18.  
  19. Hmm,
  20. any implementation for a pure-virtual function provided by some
  21. subclass is also virtual. IMO it makes sense to provide an
  22. implementation for a service ;-).
  23. Anyway it's often useful to have a 'default behavior' for a virtual
  24. function that can be changed by later subclasses.
  25.  
  26.     Enno
  27.